import java.util.*;

public class Room {

    // 1. 准备好54张牌
    private final List<Card> allCards = new ArrayList<>();
    // 2. 在房间初始化的时候，将牌放入
    {
        // 3. 准备常规点数
        String[] sizes = {"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"};
        // 4. 准备花色
        String[] colors = {"♠", "♥", "♣", "♦"};
        // 5. 点数和花色组合，创建54张牌
        for(String size : sizes){
            for(String color : colors){
                // 6. 创建一张牌
                Card card = new Card(color, size);
                // 7. 添加到牌组中
                allCards.add(card);
            }
        }
//        allCards.add(new Card("", "SMALL_JOKER"));
//        allCards.add(new Card("", "BIG_JOKER"));
        Collections.addAll(allCards, new Card("", "SMALL_JOKER"), new Card("", "BIG_JOKER"));
        System.out.println(allCards);
    }

    public void start(){

        // 8. 洗牌，打乱集合中元素顺序
        Collections.shuffle(allCards);
        // 9. 发牌: 创建三个玩家，每个玩家有一个牌的容器
        Map<String, List<Card>> players = new HashMap<>();
        players.put("玩家1", new ArrayList<>());
        players.put("玩家2", new ArrayList<>());
        players.put("玩家3", new ArrayList<>());
        // 10. 对牌排序
        // 11.看牌
    }

}
